package com.fc.entities;

import javax.persistence.Column
import javax.persistence.Entity
import javax.persistence.Table


 /**
  * 
  * @author aacs
  *
  */
@Entity
@Table(name = "UnitOfMeasurement")
public class UnitOfMeasurement extends BaseEntity {
	@Column(name = "name", unique = true, nullable = false)
	String name
	
	@Override
	public String toString() {
		return name;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (obj == null || !(obj instanceof UnitOfMeasurement)) {
			return false;	
		}
		UnitOfMeasurement other = (UnitOfMeasurement)obj;
		if (other.id == id && other.name == name) {
			return true;
		}
		return false;
	}
}
